package com.znf4.notice.server.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znf4.notice.entity.Notice;
import com.znf4.notice.mapper.NoticeMapper;
import com.znf4.notice.server.NoticeServer;

@Service
public class NoticeServerImpl implements NoticeServer {
	
	@Autowired
	private NoticeMapper noticeMapper ;

	public void addNotice(Notice notice) {
		noticeMapper.insert(notice);
		
	}

	public void updateNotice(Notice notice) {
		noticeMapper.update(notice);
		
	}

	public void delOneNotice(Notice notice) {
		noticeMapper.deleteOne(notice);
		
	}

	public void delAllNotice(List<Notice> list) {
		noticeMapper.deleteAll(list);
		
	}

	public Notice queryOne(Notice notice) {
		return noticeMapper.queryOne(notice);
	}

	public List<Notice> queryAll(Notice notice) {
		return noticeMapper.queryAll(notice);
	}
	
	
	
	
	

}
